import { constantRoutes } from '@/router'
export default {
  namespaced: true,
  state: {
    // 用于生成左侧菜单 把路由信息存到vuex中 响应式
    routes: constantRoutes
  },
  mutations: {
    setRoutes(state, asyncRoutes) {
      // console.log(asyncRoutes)
      state.routes = [...constantRoutes, ...asyncRoutes]
    }
  }
}
